<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>

    // 展开运算符...
    
    let arr = [1,2,3]
    let arr2 = [4,5,6]

    // const [a,b,c] = arr
    // let sum = fn(arr[0],arr[1],arr[2])
    let sum = fn(...arr)  // 等于 fn(arr[0],arr[1],arr[2])

    function fn(a,b,c){
        return a+b+c
    }
    console.log(sum);

    // // 数组的合并
    // console.log([...arr,...arr2]);

    // let obj1 = {
    //     a:1,b:2
    // }
    // let obj2 = {
    //     c:3,d:4
    // }

    // // 对象的合并
    // let newObj = {...obj1,...obj2}
    // console.log(newObj);

</script>             